package org.springblade.modules.admin.dto.building;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @author zcc
 * @version 1.0
 * @date 2025/8/22 11:29
 */
@Data
public class BuildingUserElevatorDTO {


	@ApiModelProperty("1:问题电梯2:脱保电梯3:断档电梯4:无合同服务电梯5:服务电梯6:丢保电梯0:全部电梯")
	private Integer type;

	@ApiModelProperty("隐藏暂停维保1:开启隐藏0:不开启")
	private Integer timeType = 0;

	@ApiModelProperty("当前页")
	private Integer current;

	@ApiModelProperty("每页的数量")
	private Integer size;


	@ApiModelProperty("项目id")
	private Long buildingId;

	@ApiModelProperty("客户id")
	private Long buildingUserId;

	@ApiModelProperty("项目ids")
	private List<Long> buildingIds;

	@ApiModelProperty("电梯ids")
	private List<Long> elevatorIds;

	@ApiModelProperty("合同状态")
	private List<Integer> contractStatuss;

	@ApiModelProperty("合同业务状态")
	private Integer allStatus;

	@ApiModelProperty("使用单位id")
	private List<Long> customerUnitIds;

	@ApiModelProperty("电梯来源")
	private Integer sourceStatus;

	@ApiModelProperty("重夺状态")
	private Integer regainStatus;


	@ApiModelProperty("电梯生命周期")
	private List<Integer> lifeStatus;

	@ApiModelProperty("合同ids")
	private List<Long> contractIds;

	@ApiModelProperty("脱保类型")
	private List<Integer> tuoType;

	@ApiModelProperty("合同生效时间-开始时间")
	private Date effectTimeBegin;
	@ApiModelProperty("合同生效时间-结束时间")
	private Date effectTimeEnd;

	@ApiModelProperty("合同到期时间-开始时间")
	private Date endTimeBegin;
	@ApiModelProperty("合同到期时间-结束时间")
	private Date endTimeEnd;

	@ApiModelProperty("合同终止时间-结束时间")
	private Date stopTimeBegin;
	@ApiModelProperty("合同到期时间-结束时间")
	private Date stopTimeEnd;


	@ApiModelProperty("合同脱保时间-结束时间")
	private Date tuoTimeBegin;
	@ApiModelProperty("合同脱保时间-结束时间")
	private Date tuoTimeEnd;


	@ApiModelProperty("合同开始时间-开始时间")
	private Date createTimeBegin;
	@ApiModelProperty("合同开始时间-结束时间")
	private Date createTimeEnd;


	@ApiModelProperty("电梯细分状态")
	private List<Integer> maintainStatuss;


	@ApiModelProperty("超时类型 1:刚到期,2:超出3天,3:超出7天,4:超时1个月,5:超2月以上")
	private Integer timeOutType;
	private Integer timeOutBeginDay;
	private Integer timeOutEndDay;


	@ApiModelProperty("即将超时类型 1:不足7天,2:不足30天,3:不足60天,4:不足90天")
	private Integer aboutEndType;
	private Integer aboutEndBeginDay;
	private Integer aboutEndEndDay;

	public void setAboutEndType(Integer aboutEndType) {
		this.aboutEndType = aboutEndType;
		if (aboutEndType == 1) {
			this.aboutEndBeginDay = 0;
			this.aboutEndEndDay = 7;
		}
		if (aboutEndType == 2) {
			this.aboutEndBeginDay = 8;
			this.aboutEndEndDay = 30;
		}
		if (aboutEndType == 3) {
			this.aboutEndBeginDay = 31;
			this.aboutEndEndDay = 60;
		}
		if (aboutEndType == 4) {
			this.aboutEndBeginDay = 61;
			this.aboutEndEndDay = 90;
		}

	}


	public void setTimeOutType(Integer timeOutType) {
		this.timeOutType = timeOutType;
		if (timeOutType == 1) {
			this.timeOutBeginDay = 0;
			this.timeOutEndDay = 3;
		}
		if (timeOutType == 2) {
			this.timeOutBeginDay = 4;
			this.timeOutEndDay = 7;
		}

		if (timeOutType == 3) {
			this.timeOutBeginDay = 8;
			this.timeOutEndDay = 30;
		}
		if (timeOutType == 4) {
			this.timeOutBeginDay = 31;
			this.timeOutEndDay = 60;
		}

		if (timeOutType == 5) {
			this.timeOutBeginDay = 61;
			this.timeOutEndDay = 50000;
		}

	}

}
